<?php
$userData = "userdata";
 
 $temp = $_FILES['myfile']["tmp_name"];
 $dpicurl2 = "";
 foreach( $temp as $k => $v) {
 	$name = $_FILES['myfile']['name'][$k];
	
	$rename = time()."_".$k.strrchr($name,".");
	$dpicurl = $userData."/$rename";
	$dpicurl2 .= $dpicurl.",";
	move_uploaded_file($v, $dpicurl );
 
 }
 
 echo $dpicurl2;
?>